<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>CellRangeUtil (POI API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="CellRangeUtil (POI API Documentation)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/CellRangeUtil.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/poi/hssf/record/cf/BorderFormatting.html" title="class in org.apache.poi.hssf.record.cf"><span class="strong">PREV CLASS</span></a></li>
<li><a href="../../../../../../org/apache/poi/hssf/record/cf/FontFormatting.html" title="class in org.apache.poi.hssf.record.cf"><span class="strong">NEXT CLASS</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/poi/hssf/record/cf/CellRangeUtil.html" target="_top">FRAMES</a></li>
<li><a href="CellRangeUtil.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>SUMMARY:&nbsp;</li>
<li>NESTED&nbsp;|&nbsp;</li>
<li><a href="#field_summary">FIELD</a>&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_summary">METHOD</a></li>
</ul>
<ul class="subNavList">
<li>DETAIL:&nbsp;</li>
<li><a href="#field_detail">FIELD</a>&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_detail">METHOD</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<p class="subTitle">org.apache.poi.hssf.record.cf</p>
<h2 title="Class CellRangeUtil" class="title">Class CellRangeUtil</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.poi.hssf.record.cf.CellRangeUtil</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <strong>CellRangeUtil</strong>
extends java.lang.Object</pre>
<dl><dt><span class="strong">Author:</span></dt>
  <dd>Dmitriy Kumshayev</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/poi/hssf/record/cf/CellRangeUtil.html#ENCLOSES">ENCLOSES</a></strong></code>
<div class="block">first range encloses or is equal to the second</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/poi/hssf/record/cf/CellRangeUtil.html#INSIDE">INSIDE</a></strong></code>
<div class="block">first range is within the second range</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/poi/hssf/record/cf/CellRangeUtil.html#NO_INTERSECTION">NO_INTERSECTION</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/poi/hssf/record/cf/CellRangeUtil.html#OVERLAP">OVERLAP</a></strong></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/poi/hssf/record/cf/CellRangeUtil.html#contains(org.apache.poi.ss.util.CellRangeAddress, org.apache.poi.ss.util.CellRangeAddress)">contains</a></strong>(<a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crA,
        <a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crB)</code>
<div class="block">Check if the specified range is located inside of this cell range.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/poi/hssf/record/cf/CellRangeUtil.html#createEnclosingCellRange(org.apache.poi.ss.util.CellRangeAddress, org.apache.poi.ss.util.CellRangeAddress)">createEnclosingCellRange</a></strong>(<a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crA,
                        <a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crB)</code>
<div class="block">Create an enclosing CellRange for the two cell ranges.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/poi/hssf/record/cf/CellRangeUtil.html#hasExactSharedBorder(org.apache.poi.ss.util.CellRangeAddress, org.apache.poi.ss.util.CellRangeAddress)">hasExactSharedBorder</a></strong>(<a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crA,
                    <a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crB)</code>
<div class="block">Check if the two cell ranges have a shared border.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/poi/hssf/record/cf/CellRangeUtil.html#intersect(org.apache.poi.ss.util.CellRangeAddress, org.apache.poi.ss.util.CellRangeAddress)">intersect</a></strong>(<a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crA,
         <a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crB)</code>
<div class="block">Intersect this range with the specified range.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/poi/hssf/record/cf/CellRangeUtil.html#mergeCellRanges(org.apache.poi.ss.util.CellRangeAddress[])">mergeCellRanges</a></strong>(<a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>[]&nbsp;cellRanges)</code>
<div class="block">Do all possible cell merges between cells of the list so that:<br>
        if a cell range is completely inside of another cell range, it gets removed from the list 
        if two cells have a shared border, merge them into one bigger cell range</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="NO_INTERSECTION">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NO_INTERSECTION</h4>
<pre>public static final&nbsp;int NO_INTERSECTION</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.poi.hssf.record.cf.CellRangeUtil.NO_INTERSECTION">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="OVERLAP">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OVERLAP</h4>
<pre>public static final&nbsp;int OVERLAP</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.poi.hssf.record.cf.CellRangeUtil.OVERLAP">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="INSIDE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>INSIDE</h4>
<pre>public static final&nbsp;int INSIDE</pre>
<div class="block">first range is within the second range</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.poi.hssf.record.cf.CellRangeUtil.INSIDE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ENCLOSES">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ENCLOSES</h4>
<pre>public static final&nbsp;int ENCLOSES</pre>
<div class="block">first range encloses or is equal to the second</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.poi.hssf.record.cf.CellRangeUtil.ENCLOSES">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="intersect(org.apache.poi.ss.util.CellRangeAddress, org.apache.poi.ss.util.CellRangeAddress)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intersect</h4>
<pre>public static&nbsp;int&nbsp;intersect(<a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crA,
            <a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crB)</pre>
<div class="block">Intersect this range with the specified range.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>crB</code> - - the specified range</dd>
<dt><span class="strong">Returns:</span></dt><dd>code which reflects how the specified range is related to this range.<br/>
 Possible return codes are:     
                NO_INTERSECTION - the specified range is outside of this range;<br/> 
                OVERLAP - both ranges partially overlap;<br/>
                INSIDE - the specified range is inside of this one<br/>
                ENCLOSES - the specified range encloses (possibly exactly the same as) this range<br/></dd></dl>
</li>
</ul>
<a name="mergeCellRanges(org.apache.poi.ss.util.CellRangeAddress[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mergeCellRanges</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>[]&nbsp;mergeCellRanges(<a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>[]&nbsp;cellRanges)</pre>
<div class="block">Do all possible cell merges between cells of the list so that:<br>
        <li>if a cell range is completely inside of another cell range, it gets removed from the list 
        <li>if two cells have a shared border, merge them into one bigger cell range</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cellRanges</code> - </dd>
<dt><span class="strong">Returns:</span></dt><dd>updated List of cell ranges</dd></dl>
</li>
</ul>
<a name="contains(org.apache.poi.ss.util.CellRangeAddress, org.apache.poi.ss.util.CellRangeAddress)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contains</h4>
<pre>public static&nbsp;boolean&nbsp;contains(<a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crA,
               <a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crB)</pre>
<div class="block">Check if the specified range is located inside of this cell range.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>crB</code> - </dd>
<dt><span class="strong">Returns:</span></dt><dd>true if this cell range contains the argument range inside if it's area</dd></dl>
</li>
</ul>
<a name="hasExactSharedBorder(org.apache.poi.ss.util.CellRangeAddress, org.apache.poi.ss.util.CellRangeAddress)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasExactSharedBorder</h4>
<pre>public static&nbsp;boolean&nbsp;hasExactSharedBorder(<a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crA,
                           <a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crB)</pre>
<div class="block">Check if the two cell ranges have a shared border.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the ranges have a complete shared border (i.e.
 the two ranges together make a simple rectangular region.</dd></dl>
</li>
</ul>
<a name="createEnclosingCellRange(org.apache.poi.ss.util.CellRangeAddress, org.apache.poi.ss.util.CellRangeAddress)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>createEnclosingCellRange</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;createEnclosingCellRange(<a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crA,
                                        <a href="../../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;crB)</pre>
<div class="block">Create an enclosing CellRange for the two cell ranges.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>enclosing CellRange</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/CellRangeUtil.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/poi/hssf/record/cf/BorderFormatting.html" title="class in org.apache.poi.hssf.record.cf"><span class="strong">PREV CLASS</span></a></li>
<li><a href="../../../../../../org/apache/poi/hssf/record/cf/FontFormatting.html" title="class in org.apache.poi.hssf.record.cf"><span class="strong">NEXT CLASS</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/poi/hssf/record/cf/CellRangeUtil.html" target="_top">FRAMES</a></li>
<li><a href="CellRangeUtil.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>SUMMARY:&nbsp;</li>
<li>NESTED&nbsp;|&nbsp;</li>
<li><a href="#field_summary">FIELD</a>&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_summary">METHOD</a></li>
</ul>
<ul class="subNavList">
<li>DETAIL:&nbsp;</li>
<li><a href="#field_detail">FIELD</a>&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_detail">METHOD</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
                <i>Copyright 2014 The Apache Software Foundation or
        its licensors, as applicable.</i>
            </small></p>
</body>
</html>
